<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录</title>
    <script src="js/jquery.min.js"></script>
    <script>
        function mysub() {
            var username = jQuery("#username").val
            var password = jQuery("#password").val
            jQuery.getJSON("/user/login",{
                "username":username,
                "password":password
            },
            function(result) {
                if(result.succ==200) {
                    alert("返回结果：" + result.msg);
                }else {
                    alert("登录失败！")
                }
            }
            );
        }

    </script>
</head>
<body>
    <form action="/user/login">
        <div style="text-align: center;" >
            <h3>登录</h3>
            用户：<input name="username"><br>
            密码：<input type="password" name ="password"><br>
            <input type="submit" value="登录" >
        </div>
    </form>

</body>
</html>